#include "Vertex3D.h"

Vertex3D::Vertex3D(double x, double y, double z)
{
    this->x = x;
    this->y = y;
    this->z = z;
}
Vertex3D::Vertex3D(const Vertex3D &copy)
{
    this->x = copy.x;
    this->y = copy.y;
    this->z = copy.z;
}
Vertex3D::~Vertex3D()
{
    //dtor
}


const double operator*(const Vertex3D &a, const Vertex3D &b)
{
    return a.x*b.x + a.y*b.y + a.z*b.z;
}

const double ScalarProduct(const Vertex3D &a, const Vertex3D &b)
{
    return a*b;
}

const Vertex3D CrossProduct(const Vertex3D &a, const Vertex3D &b)
{
    return Vertex3D(a.y*b.z - a.z*b.y, a.z*b.x - a.x*b.z, a.x*b.y - a.y*b.x);
}

